package qx.hyj.demos.enums;

public enum ErrorCode {
    BOOK_NOT_FOUND("BOOK_NOT_FOUND", "书籍不存在"),
    USER_NOT_FOUND("USER_NOT_FOUND", "用户不存在,请先注册"),
    BOOK_CAOCHUAN("BOOK_CAOCHUAN", "书籍超借"),
    AVAILABLE("AVAILABLE", "书籍可借"),
    BORROWED("BORROWED", "书籍已借出"),
    NOT_FOUND_RECODE("NOT_FOUND_RECODE", "记录不存在"),
    BOOK_HAVE("BOOK_HAVE", "书籍您已借了");

    private String code;
    private String message;

    ErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
